package com.example.supermarket.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 *
 * </p>
 *
 * @author hpp
 * @since 2021-10-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Category extends Model<Category> {

    private static final long serialVersionUID = 1L;

    /**
     * 分类id
     */
    @TableId(value = "cate_id", type = IdType.AUTO)
    private Integer cateId;

    /**
     * 分类名称
     */
    private String cateName;

    /**
     * 分区名称
     * */
    private Integer depId;

    /*子选项*/
    @TableField(exist = false)
    private List<Goods> children;

    /*value*/
    @TableField(exist = false)
    private Integer value = cateId;

    /*label*/
    @TableField(exist = false)
    private String label = cateName;
    /*value*/
    @Override
    protected Serializable pkVal() {
        return null;
    }

}
